<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>登录</title>
    <link rel="stylesheet" href="./css/register.css">
    <link rel="stylesheet" href="./css/find.css">
</head>

<body>
    <div class="dowebok">
        <!-- <div class="logo"></div> -->
        <div class="form-item">
            <input id="username" type="text" autocomplete="off" placeholder="邮箱">
            <p class="tip tip1">请输入合法的邮箱地址</p>
        </div>
        <div class="form-item">
          <input id="password1" class="password" type="password" autocomplete="off" placeholder="设置新密码">
          <p class="tip tip2">两次密码不一致</p>
        </div>
        <div class="form-item">
          <input id="password2" class="password" type="password" autocomplete="off" placeholder="确认密码">
          <p class="tip tip3">两次密码不一致</p>
        </div>
        <div class="form-item">
            <input id="code" class="password" type="password" autocomplete="off" placeholder="验证码">
            <span class="getcode">获取</span>
            <p class="tip tip4">验证码</p>
        </div>
        <div class="btn">
            <div class="form-item"><a href="#"><button class="btn2" id="submit">确 认 找 回</button></a></div>
        </div>
    </div>
    <script src="js/jquery.min.js"></script>
    <script>
        $(function () {
            $('#submit').on('click', function () {
                $('.tip').hide()
                if(!$("#username").val()) {
                    $('.tip1').show()
                }
                if(!$("#password1").val()) {
                    $('.tip2').show()
                }
                if(!$("#password2").val()) {
                    $('.tip3').show()
                }
                if($("#password1").val()!=$("#password2").val()) {
                    $('.tip2').show()
                    $('.tip3').show()
                }
                if(!$("#code").val()) {
                    $('.tip4').show()
                }
            })
        })
    </script>
</body>

</html>